package cn.com.api.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import cn.com.api.entity.ApiJuan;
import cn.com.api.entity.ApiToken;
import cn.com.util.*;

@Service
public interface ApiJuanService {

	public boolean insert(ApiJuan apiJuan);

	//更新 
	public boolean updateJuan(ApiJuan apiJuan);
	
	public List<Map<String, String>> select();

	public List<Map<String, String>> selectByUid(String uid);

	public boolean delete(String id);

	public List<Map<String, String>> selectByArea(String cityid, String gtype);
	
	//查询地区可用全城优惠券 
	public List<Map<String, String>> selectQuanJuansByArea(String cityid);
	
	public boolean receiveJuan(String uid, String juanid, String filePath);

	public Map<String, Object> payJuan(String money, String[] citys,
			String[] shops, String uid,Map<String,Object> map,String products);

	public List<Map<String, String>> selectByModListPage(Map<String,Object> map,PageInfo pageInfo);
	
	public Integer searIsEnable(String uid, String jid);

	//根据id查询详情
	public Map<String, Object> selectById(String id);
	
	//使用全城优惠券
	public boolean useJuan(Integer juanid,String uid,String shopid);
	//获取全城优惠券的列表
	public List<Map<String, String>> getJuanListByUserid(String uid);
	//获取全城优惠券的列表通过商家ID

	public List<Map<String, String>> getJuanByShopId(String shopid);
	
	public List<Map<String,Object>> selectByUserId(String uid);
	
	public ApiJuan selectJuanByCid(Integer uid);
	
	public boolean updateCanReceive(String cid);

	public List<ApiJuan> searchMemberJuanListPage(HashMap map, PageInfo page);

}
